home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 001-025 / disk_013 / xeno1.bas < prev    next >
BASIC Source File  |  1992-05-06  |  3KB  |  45 lines

  1. 10    ' Xenos.Bas
  2. 20    ' (C) 1983,1985 by Kevin A. Bjorke
  3. 30    '                  25724 Salceda Rd/Vlnca, CA 91355
  4. 40    '               CIS:74756,464
  5. 50    '
  6. 60    dim mt(16,16),mv(254),xy(1,16,1):LN%=1:def fnkrak(p,q)=p/q+rv*(rnd(1)-.5)
  7. 70    scnclr:? "Planet Xenos":? "(C) 1983, 1985 KABjorke":?
  8. 80    ' input "Random # Seed:",sd%:randomize sd%
  9. 90    ask mouse a%,b%,c%:sd%=a%+b%:randomize sd%
  10. 100   ' input "Scale:",rc:screen 0,4,0:if rc=0 then rc=250
  11. 110   ?:?"[Left Mouse Button to continue]"
  12. 120   ask mouse a%,b%,c%:if c%<>4 then 120
  13. 130   rc=250:screen 0,4,0
  14. 140   pena 1:penb 1:peno 1:drawmode 1:box (0,0;319,199),1:pena 13
  15. 150   for a%=0 to 1+rnd(1)*4:b%=int(rnd(1)*4)+1:b2%=int(rnd(1)*310)+5:b3%=int(rnd(1)*130)+5
  16. 160   c%=int(rnd(1)*12)+2:pena c%:peno c%:circle (b2%,b3%),b%:paint(b2%,b3%),0:next a%
  17. 170   for a%= 1 to int(rnd(1)*200)+200:draw(int(rnd(1)*320),int(rnd(1)*199)),int(rnd(1)*10)+2:next a%:pena 14:peno 14
  18. 180   for a%=198 to 124 step -1:box(0,a%;319,199),1:next a%:draw (0,124 to 319,124),13
  19. 190   for l%=14 to 1 step -1:dx=320*(-l%):bc%=0:for r=-4 to 14:dy=(15-r)*320+900: if (dx+320)*900/dy < -320 then 390
  20. 200   if r>12 then n%=4 else if r>8 then n%=3 else if r%>4 then n%=2 else n%=1
  21. 210   n2%=2^n%:nm%=2^(4-n%):ns%=20*nm%:for c%=0 to 16 step nm%:mt(0,c%)=mv(bc%+c%\nm%):mt(c%,0)=mt(c%,16):next c%:if LN%<>n% then for c%=nm% to 16-nm% step 2*nm%:mt(c%,0)=(mt(c%-nm%,0)+mt(c%+nm%,0))/2:next c%
  22. 220   rv = rc:mt(16,16)=fnkrak(mt(16,0)+mt(0,16),2)
  23. 230   for c%=1 to n%:c2%=2^c%:cm%=2^(4-c%):c3%=2*cm%:rv=rc/c2%
  24. 240   for d%=cm% to 16 step c3%:dd%=d%-cm%:du%=d%+cm%
  25. 250   for e%=cm% to 16 step c3%:ed%=e%-cm%:eu%=e%+cm%
  26. 260   mt(du%,e%)=fnkrak(mt(du%,ed%)+mt(du%,eu%),2):mt(d%,eu%)=fnkrak(mt(dd%,eu%)+mt(du%,eu%),2)
  27. 270   mt(d%,e%)=fnkrak(mt(dd%,ed%)+mt(dd%,eu%)+mt(du%,ed%)+mt(du%,eu%),4): next e%,d%,c%
  28. 280   '
  29. 290   for a%=0 to 16 step nm%:mc=900/((16-a%)*20+dy):sp=ns%*mc:px=320+dx*mc:py=126+100*mc
  30. 300   for b%=0 to 16 step nm%:b2%=b%-nm%:for c%=0 to 1:xy(1,b%,c%)=xy(0,b%,c%):next c%
  31. 310   xy(0,b%,0)=px:if mt(b%,a%)>0 then xy(0,b%,1)=py-mt(b%,a%)*mc  else xy(0,b%,1)=py
  32. 320   if b%=0 or a%=0 or xy(0,b%,0)<0 then 370
  33. 330   if mt(b%,a%)<=0 and mt(b2%,a%)<=0 then draw(xy(0,b%,0),xy(0,b%,1);xy(0,b2%,0),xy(0,b2%,1)),0:goto 370
  34. 340   if xy(0,b2%,1)>xy(1,b2%,1) and xy(0,b%,1)>xy(1,b%,1) then 370
  35. 350   area (xy(0,b%,0),199 to xy(0,b2%,0),199 to xy(0,b2%,0),xy(0,b2%,1) to xy(0,b%,0),xy(0,b%,1))
  36. 360   draw (xy(0,b2%,0),xy(0,b2%,1) to xy(0,b%,0),xy(0,b%,1)),13
  37. 370   px=px+sp:next b%,a%
  38. 380   for c%=0 to 16 step nm%:mv(bc%)=mt(16,c%):bc%=bc%+1:next c%:LN%=n%:next r
  39. 390   for c%=0 to 16:mt(c%,16)=0:next c%,l%
  40. 395   ask mouse a%,b%,c%:if c%=4 then 395
  41. 400   ask mouse a%,b%,c%:if c%=0 then 400
  42. 410   scnclr:goto 140
  43. 420   '
  44. 430   ' eof
  45.